import Router from '@koa/router'
import {
    deletePayRecordByIdController,
    getPayRecordPageController,
    postPayRecordController,
    putPayRecordByIdController,
    getGenRecordController,
} from '../controllers/payRecord'

const payRecordRouter = new Router({
    prefix: '/pay-record',
})

// 用户的增删改查
payRecordRouter.get('/', getPayRecordPageController) // 获取用户列表
payRecordRouter.get('/gen-record', getGenRecordController) // 根据停车记录产生订单

payRecordRouter.post('/', postPayRecordController) // 添加用户
payRecordRouter.put('/:id', putPayRecordByIdController) // 修改用户信息
payRecordRouter.delete('/:id', deletePayRecordByIdController) // 删除用户

export default payRecordRouter
